
=begin
  This class is used to make a request to a remote web service.
=end
class RemoteRequest
  
  attr_accessor :url, :method, :content_type
  attr_accessor :authorization, :oauth_service_name
  
  # Sets up the request object with required parameters
  def initialize(url, method, content_type, authorization, oauth_service_name)
    @url = url
    @method = method
    @content_type = content_type
    @authorization = authorization
    @oauth_service_name = oauth_service_name
  end
  
  
  # Make the remote request
  def process
    if @method == 'GET'
      @response = Net::HTTP.get(URI.parse(@url))
    else
      @response = Net::HTTP.post(URI.parse(@url))
    end
  end
  
end

